<?php
session_start();
if (!isset($_SESSION["nic_user"])) {
    header("Location: ./");
    exit();
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">    
    <head>
        <title>SMSEmpresa - Página Principal</title> 
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
        <meta http-equiv="Content-Language" content="es-NI" /> 
        <meta name="description" content="SMSEmpresa" />
        <meta name="keywords" content="SMSEmpresa" />
        <link rel="stylesheet" type="text/css" media="all" href="style.css?v=1"/>        
    </head>
    <body>
        <div class="container">
            <div style="background: url(images/top_bg.gif)">
                <div id="header">
                    <br/>
                    <div style="padding: 38px 0 5px 10px; margin-top:-30px; width:100%;" align="left">
                        <a href="../A2P/"><img src="images/logo.png" height="110" width="149" border="0" /></a>
                    </div>
                    <div style="padding: 88px 0 0 0; margin-left:-4px; margin-top:-90px; width:100%;" align="right">
                        <a href="javascript:;" style="font-size:12px; color:#FFF; padding-left:5px; padding-right:5px; background:#6cb5d9;" onclick="logout();">Cerrar sesi&oacute;n</a></div>

                </div>
            </div>
            <div class="dvmenu">
                <div id="content">
                    <div id="Menu_Contenido">
                        <ul class="menu">
                            <?php
                            require('clases/permisos.class.php');

                            $objPermiso = new Permiso;
                            $consulta = $objPermiso->obtener_permisos($_SESSION["nic_user"]);

                            if ($consulta) {
                                while ($role = mysql_fetch_array($consulta)) {

                                    if ($role['id'] == 1) {
                                        echo "<li><a href='menu_sms.php?v=".rand(1,100)."' target='contenido'><span>Enviar SMS</span></a></li>";
                                    }
                                    if ($role['id'] == 2) {
                                        echo " <li><a href='index_contactos.php?v=".rand(1,100)."' target='contenido'><span>Contactos</span></a></li>";
                                    }
                                    if ($role['id'] == 3) {
                                        echo " <li><a href='index_grupos.php?v=".rand(1,100)."' target='contenido'><span>Grupos</span></a></li>";
                                    }
                                    if ($role['id'] == 4) {
                                        echo "<li><a href='index_keyword.php?v=".rand(1,100)."' target='contenido'><span>Keywords</span></a></li>";
                                    }
                                    if ($role['id'] == 5) {
                                        echo "<li><a href='index_users.php?v=".rand(1,100)."' target='contenido'><span>Administraci&oacute;n</span></a></li>";
                                    }
                                    if ($role['id'] == 6) {
                                        echo "<li><a href='index_roles.php?v=".rand(1,100)."' target='contenido'><span>Roles</span></a></li>";
                                    }
                                    if ($role['id'] == 7) {
                                        echo "<li><a href='menu_reportes.php?v=".rand(1,100)."' target='contenido'><span>Reportes</span></a></li>";
                                    }
                                }
                            }
                            ?>
                        </ul>
                    </div>
                </div>
            </div>
            <div id="iframe" >
                <iframe name="contenido" id='contenido' frameborder="0" width="950" style="height: 450px" src="intro.html?v=1" scrolling="no"></iframe>
                <div style="background: white; width:100%;" class="n1"><img src="images/Hdivr.png" width="700" height="7" /><br/>	
                    <a href="#" class="n1">About Company</a> 
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="#" class="n1">Contact us</a>
                    &nbsp;&nbsp;&nbsp;&nbsp;
                    2010 Copyright by Company Xurpas
                </div>
            </div>
        </div>
        <script type="text/javascript" src="js/jquery.js"></script>
        <script type="text/javascript"  src="js/jquery.iframeautoheight.js"></script>
        <script type="text/javascript" src="sliding_effect.js"></script>
        <script type="text/javascript" src="js/libraries.js"></script>
        <script type="text/javascript" >
            $().ready(function () {               
                $('#contenido').iframeAutoHeight({heightOffset: 50,minHeight: 300});  
            });
        </script>
    </body>
</html>





